﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class Role : Creature
{
    CreateSenceRoleCmd _serverData;
    RoleDatabase _tableData;

   
    public override void Init(CreateSenceCreature serverData, CreatureDatabase tableData)
    {
        base.Init(serverData, tableData);
        _serverData = serverData as CreateSenceRoleCmd;
        _tableData = tableData as RoleDatabase;
        
    }
    //摇杆移动
    public void JoystickMove(Vector3 target)
    {
        PurposeTo(target);
    }
    //点击地面移动
    public void TouchGroundPathTo(Vector3 target)
    {
        PurposeTo(target);
    }
    public override bool CanBeAttack(Creature attacker)
    {
        if (!base.CanBeAttack(attacker)) { return false; }
        //（除自己）所有角色都能打
        return attacker != this;
    }
}
